Skip to main content

CreateTemplate

Description

call CreateTemplate to create an orchestration template.

Request Method

POST

Request Path

/apsara/route/CS/CreateTemplate

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
templateBODYstringYesapiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: test-satemplate content in YAML format.
regionIdBODYstringYesNo sample value for this parameter.region id
nameBODYstringYesservice-account-templatetemplate name. naming rule: consists of numbers, Chinese characters, English characters, or dashes (-), and the length ranges from 1 to 63 characters, and cannot start with a dash (-).
descriptionBODYstringNothis is testlayout template description.
template_typeBODYstringNokubernetestemplate type, the value can be any value. when the value is kubernetes will be displayed on the orchestration template page of the console. when the value is compose will not be displayed in the console. recommended to kubernetes. default value:compose.
versionBODYstringNo2016-01-01version of api
tagsBODYstringNotestorchestration template tags.

Return data

NameTypeSample valueDescription
template_idstringba1fe77b-b01e-4640-b77e-8f1b80e3e3cforchestration template ID.

Example

Successful Response example

{
"template_id":"ba1fe77b-b01e-4640-b77e-8f1b80e3e3cf"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}